<?php
/* Smarty version 3.1.33, created on 2019-12-19 09:29:04
  from 'D:\xampp\htdocs\ps_project\application\views\templates\diner\order.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_5dfb34d00541a9_25155268',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'aff020b650ed4df1df9ab95b5a4001c3b7d7db40' => 
    array (
      0 => 'D:\\xampp\\htdocs\\ps_project\\application\\views\\templates\\diner\\order.tpl',
      1 => 1576744142,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5dfb34d00541a9_25155268 (Smarty_Internal_Template $_smarty_tpl) {
?><!DOCTYPE html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/html">

<head>
	<meta charset="UTF-8">
	<title>订餐</title>
</head>

<body>
<a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value['base_url'];?>
diner/shop/<?php echo $_smarty_tpl->tpl_vars['mid']->value;?>
">返回点单</a><br>

<ul>
	<?php if ($_smarty_tpl->tpl_vars['orders']->value != NULL) {?>
		<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['orders']->value, 'dish');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['dish']->value) {
?>
			<li>菜名: <?php echo $_smarty_tpl->tpl_vars['dish']->value['dname'];?>
</li>
			<li>价格: <?php echo $_smarty_tpl->tpl_vars['dish']->value['price'];?>
</li>
			<li>折扣: <?php echo $_smarty_tpl->tpl_vars['dish']->value['discount'];?>
</li>
			<li>份数: <?php echo $_smarty_tpl->tpl_vars['dish']->value['number'];?>
</li>
			<br>
		<?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
		总价：<?php echo $_smarty_tpl->tpl_vars['money']->value;?>
<br>
	<?php } else { ?>
		订单为空
	<?php }?>

	<form action="<?php echo $_smarty_tpl->tpl_vars['base_url']->value['base_url'];?>
diner/order/<?php echo $_smarty_tpl->tpl_vars['mid']->value;?>
" method="post">
		<table>
			<tr>
				<th>选择</th>
				<th>收货地址</th>
				<th>收货人</th>
				<th>收获人电话</th>
			</tr>
			<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['addrs']->value, 'addr');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['addr']->value) {
?>
			<tr>
				<td><input type="radio" name="addr" value="<?php echo $_smarty_tpl->tpl_vars['addr']->value->id;?>
"></td>
				<td><?php echo $_smarty_tpl->tpl_vars['addr']->value->addr;?>
</td>
				<td><?php echo $_smarty_tpl->tpl_vars['addr']->value->rname;?>
</td>
				<td><?php echo $_smarty_tpl->tpl_vars['addr']->value->phone_number;?>
</td>
			</tr>
			<?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
		</table>
		<?php if ($_smarty_tpl->tpl_vars['orders']->value != NULL) {?>
			<button type="submit" name="submit" value="true">
				<span>下单</span>
			</button>
		<?php }?>
		<a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value['base_url'];?>
diner/addaddr/<?php echo $_smarty_tpl->tpl_vars['mid']->value;?>
">
			<input type="button" value="新增收货地址">
		</a>
	</form>

</ul>
</body>

</html>
<?php }
}
